<!DOCTYPE html>
<html>
<head>
    <meta charset=" utf-8">
    <title>test</title>
    <script type="text/javascript">
        window.onload=function() {
            var odiv = document.getElementById("divc");
            var obt = document.getElementById("bt");
            var count = 0;
            obt.onclick = function () {
                count = count + 1;
                odiv.innerHTML = count;
            }
        }
    </script>
</head>
<body>
<div id="divc">0</div>
<input type="button" id="bt" value="点击这里"/>
</body>
</html>